package com.sk.bilibili.model.activity;

import com.sk.api.annotations.Autowired;
import com.sk.bilibili.bean.VideoSet;
import com.sk.bilibili.callBack.RequestCallBack;
import com.sk.bilibili.dto.Page;
import com.sk.bilibili.mapper.VideoSetMapper;
import com.sk.bilibili.model.BaseModel;
import com.sk.bilibili.other.JsonMap;
import com.sk.bilibili.utils.RequestUtils;
import com.sk.bilibili.view.activity.SpaceSearchActivity;

public class SpaceSearchModel extends BaseModel<SpaceSearchActivity> {

    @Autowired
    VideoSetMapper videoSetMapper;

    public void search(String keyword, Integer memberId) {
        JsonMap map=new JsonMap();
        map.put("keyword",keyword);
        map.put("memberId",memberId);
        map.put("size",2233);
        RequestUtils.process(videoSetMapper.searchVideoSets(map),
                videoSetPage -> view.searchSuccess(videoSetPage.getRecords()));
    }

}